﻿# CMakeList.txt: CMakeProjectVS1 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#


# 将源代码添加到此项目的可执行文件。

add_executable (CMakeProjectVS1 "main.cpp" "main.h" "MyDemo.cpp" "MyDemo.h")

#静态库导入
add_subdirectory(staticLib) 

#动态库头文件
include_directories(../sharelib)

#静态库头文件包含(非必须)
include_directories(../sharelib2)

#静态库、动态库导入
target_link_libraries(CMakeProjectVS1 PUBLIC "staticLib" sharelib "staticLib2") 

#运行时静态库header文件
target_include_directories(CMakeProjectVS1 PUBLIC 
                           "${CMAKE_CURRENT_SOURCE_DIR}/staticLib" 
                            "../staticLib2" 
                           ) 
#临时测试
if (MSVC)
  message(STATUS ">>编译器: MSVC ${CMAKE_CURRENT_BINARY_DIR}")
  message(STATUS ">>编译器: MSVC ${PROJECT_BINARY_DIR}")
  message(STATUS,">>项目名称:${CMAKE_PROJECT_NAME}")
endif ()

if (CMAKE_VERSION VERSION_GREATER 3.12)
  set_property(TARGET CMakeProjectVS1 PROPERTY CXX_STANDARD 20)
endif()
